class Chainable:
    def __init__(self, value):
        self.value = value
    
    def add(self, value):
        self.value += value
        return self
    
    def subtract(self, value):
        self.value -= value
        return self

# Usage:
result = Chainable(5).add(3).subtract(2).value


print(result)